﻿using dll_DynamicDataDisplay.ViewModels;
using dll_DynamicDataDisplay.ViewModels.DispElement;
using MathFlowLib.FeatureJudge;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MathFlowLib
{
    /// <summary>
    /// 直线算法结果类
    /// </summary>
    public class Vm_MathFlow_Line_Output : Vm_MathFlow_Output
    {

        /// <summary>
        /// 强度表格
        /// </summary>
        public Vm_Chart ChartIntensity
        {
            get { return _ChartIntensity; }
            set
            {
                if (_ChartIntensity != value)
                {
                    _ChartIntensity = value;
                    this.OnPropertyChanged("ChartIntensity");
                }
            }
        }
        private Vm_Chart _ChartIntensity = new Vm_Chart();


        /// <summary>
        /// 强度曲线
        /// </summary>
        public Vm_Element_Curve CurveIntensity
        {
            get { return _CurveIntensity; }
            set
            {
                if (_CurveIntensity != value)
                {
                    _CurveIntensity = value;
                    this.OnPropertyChanged("CurveIntensity");
                }
            }
        }
        private Vm_Element_Curve _CurveIntensity = new Vm_Element_Curve();


        /// <summary>
        /// 均匀度
        /// </summary>
        public Vm_Feature Uniformity
        {
            get { return _Uniformity; }
            set
            {
                if (_Uniformity != value)
                {
                    _Uniformity = value;
                    this.OnPropertyChanged("Uniformity");
                }
            }
        }
        private Vm_Feature _Uniformity = new Vm_Feature() { FeatureName = "均匀度" };


        /// <summary>
        /// 偏差表格
        /// </summary>
        public Vm_Chart ChartDiff
        {
            get { return _ChartDiff; }
            set
            {
                if (_ChartDiff != value)
                {
                    _ChartDiff = value;
                    this.OnPropertyChanged("ChartDiff");
                }
            }
        }
        private Vm_Chart _ChartDiff = new Vm_Chart();


        /// <summary>
        /// 偏差曲线
        /// </summary>
        public Vm_Element_Curve CurveDiff
        {
            get { return _CurveDiff; }
            set
            {
                if (_CurveDiff != value)
                {
                    _CurveDiff = value;
                    this.OnPropertyChanged("CurveDiff");
                }
            }
        }
        private Vm_Element_Curve _CurveDiff = new Vm_Element_Curve();


        /// <summary>
        /// 直线度
        /// </summary>
        public Vm_Feature Straightness
        {
            get { return _Straightness; }
            set
            {
                if (_Straightness != value)
                {
                    _Straightness = value;
                    this.OnPropertyChanged("Straightness");
                }
            }
        }
        private Vm_Feature _Straightness = new Vm_Feature() { FeatureName = "直线度" };


        /// <summary>
        /// 线宽图表
        /// </summary>
        public Vm_Chart ChartWidth
        {
            get { return _ChartWidth; }
            set
            {
                if (_ChartWidth != value)
                {
                    _ChartWidth = value;
                    this.OnPropertyChanged("ChartWidth");
                }
            }
        }
        private Vm_Chart _ChartWidth = new Vm_Chart();


        /// <summary>
        /// 线宽曲线
        /// </summary>
        public Vm_Element_Curve CurveWidth
        {
            get { return _CurveWidth; }
            set
            {
                if (_CurveWidth != value)
                {
                    _CurveWidth = value;
                    this.OnPropertyChanged("CurveWidth");
                }
            }
        }
        private Vm_Element_Curve _CurveWidth = new Vm_Element_Curve();




        /// <summary>
        /// ctor
        /// </summary>
        public Vm_MathFlow_Line_Output()
        {
            ChartIntensity.ElementCollection.Add(CurveIntensity);
            ChartDiff.ElementCollection.Add(CurveDiff);
            ChartWidth.ElementCollection.Add(CurveWidth);

            string[] nameArr = new string[] { "角度", "均匀度", "直线度" };
            for (int i = 0; i < 3; i++)
            {
                FeatureCollection.Add(new Vm_Feature()
                {
                    FeatureName = nameArr[i]
                });
            }
        }
    }
}
